// 采购发票
import request from "../request";

// 获取表单列表 排序、查询、重置、高级查询也用这个
export function Getlist(params) {
  return request({
    url: "/finance/finPurInvoice/list/0/0?",
    method: "get",
    params,
  });
}

// 删除
export function DelOnelist(id) {
  return request({
    url: `/finance/finPurInvoice/delete?id=` + id,
    method: "delete",
  });
}

// 获取新增弹窗的单据编号
export function Getdjbh() {
  return request({
    url: `/sys/fillRule/executeRuleByCode/fin_xsfp_bill_no`,
    method: "put",
  });
}

// 新增弹窗点击保存接口
export function Setnewlist(data) {
  return request({
    url: "/finance/finPurInvoice/add/save",
    method: "post",
    data,
  });
}
// 新增弹窗点击提交接口
export function Addnewlist(data) {
  return request({
    url: "/finance/finPurInvoice/add/submit",
    method: "post",
    data,
  });
}

// 蓝字单据
export function Getlzdj(params) {
  return request({
    url: "/online/cgreport/api/getData/1264480038387372034?",
    method: "get",
    params,
  });
}
// 蓝字单据弹窗确定
export function Setlzdj(params) {
  return request({
    url: "/finance/finPurInvoice/queryEntryByMainId?",
    method: "get",
    params,
  });
}

// 点击编辑回显
export function GetOnelist(params) {
  return request({
    url: "/finance/finPurInvoice/queryEntryByMainId?",
    method: "get",
    params,
  });
}
// 编辑点击保存接口
export function SetOnelist(data) {
  return request({
    url: "/finance/finPurInvoice/edit/save",
    method: "put",
    data,
  });
}
// 编辑点击提交接口
export function AddOnelist(data) {
  return request({
    url: "/finance/finPurInvoice/edit/submit",
    method: "put",
    data,
  });
}

// 关闭
export function Off(data) {
  return request({
    url: "/finance/finPurInvoice/close",
    method: "put",
    data,
  });
}

// 反关闭
export function NoOff(data) {
  return request({
    url: "/finance/finPurInvoice/unclose",
    method: "put",
    data,
  });
}

// 审核弹窗点击审核
export function ShenHe(data) {
  return request({
    url: "/finance/finPurInvoice/check",
    method: "put",
    data,
  });
}

// 作废弹窗点击作废
export function ZuoFei(data) {
  return request({
    url: "finance/finPurInvoice/void",
    method: "put",
    data,
  });
}
